package com.sgb.kjwl.view.ui.adapter.self.publish;

import android.content.Context;
import android.widget.TextView;

import com.sgb.kjwl.BR;
import com.sgb.kjwl.R;
import com.sgb.kjwl.model.entity.ConcreteAdmixtureFactEntity;
import com.sgb.kjwl.model.entity.ConcreteStrongFactEntity;
import com.swgk.core.recyclerview.adapter.BaseRecycleAdapter;
import com.swgk.core.recyclerview.adapter.ItemViewHolder;

import java.util.List;

public class ConcreteAdapter extends BaseRecycleAdapter<ConcreteAdmixtureFactEntity.SpecEntity> {
    private int index;
    private TextView mTvName;

    public ConcreteAdapter(Context context, List<ConcreteAdmixtureFactEntity.SpecEntity> datas) {
        super(context, R.layout.item_concrete_info, datas);
    }

    @Override
    public void convert(ItemViewHolder holder, final ConcreteAdmixtureFactEntity.SpecEntity entity) {
        holder.setBinding(BR.viewModel, entity);
        mTvName = holder.getItem().findViewById(R.id.tv_name);
        mTvName.setText(entity.getAdmixtureName());
    }

    public int getIndex() {
        return index;
    }

    public void setIndex(int index) {
        this.index = index;
    }
}
